class: title-slide, left, bottom # Combining a smooth information crietion with neural networks ---- ## **Andrew McInerney**, ** ** ### University of Limerick #### LMU, 07 July 2023 --- # Introduction <img src="data:image/png;base64,#img/limerick-map.png" width="40%" style="display: block; margin: auto;" /> --- # Background -- * Ph.D. student since 2020 -- * Research: Neural networks from a statistical-modelling perspective -- <img src="data:image/png;base64,#img/packages.png" width="70%" style="display: block; margin: auto;" /> --- class: selectnn-slide # Model Selection <img src="data:image/png;base64,#img/modelsel.png" width="90%" style="display: block; margin: auto;" /> A Statistically-Based Approach to Feedforward Neural Network Model Selection (arXiv:2207.04248) --- class: selectnn-slide # Insurance: Model Selection ```r library(selectnn) nn <- selectnn(charges ~ ., data = insurance, Q = 8, n_init = 5) summary(nn) ``` -- ```{.bg-primary} ## [...] ## Number of input nodes: 4 ## Number of hidden nodes: 2 ## ## Value: 1218.738 ## Covariate Selected Delta.BIC ## smoker.yes Yes 2474.478 ## bmi Yes 919.500 ## age Yes 689.396 ## children Yes 13.702 ## [...] ``` --- class: interpretnn-slide # Interpreting FNNs Extend packages: **nnet**, **neuralnet**, **keras**, **torch** * Significance testing * Covariate-effect plots --- class: interpretnn-slide # Insurance: Model Summary ```r intnn <- interpretnn(nn) summary(intnn) ``` -- ```{.bg-primary} ## Coefficients: ## Weights | X^2 Pr(> X^2) ## age (0.19, -0.41***) | 24.1009 5.84e-06 *** ## sex.male (-0.25, 0.05.) | 3.6364 1.62e-01 ## bmi (-26.11***, -0.03*) | 14.7542 6.25e-04 *** ## children (0.16, -0.07***) | 13.1946 1.36e-03 ** ## smoker.yes (63.64***, -2.83***) | 62.8237 2.28e-14 *** ## region.northwest (-3.65., 0.03) | 3.4725 1.76e-01 ## region.southeast (-1.95*, 0.08*) | 7.8144 2.01e-02 * ## region.southwest (-1.27, 0.12**) | 9.1267 1.04e-02 * ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ``` --- class: interpretnn-slide # Insurance: Model Summary ```r plotnn(intnn) ``` -- <img src="data:image/png;base64,#img/plotnn.png" width="70%" style="display: block; margin: auto;" /> --- class: interpretnn-slide # Insurance: Covariate Effects ```r plot(intnn, conf_int = TRUE, which = c(1, 4)) ``` -- .pull-left[ <!-- --> ] -- .pull-right[ <!-- --> ] --- class: bigger # References * McInerney, A., & Burke, K. (2022). A statistically-based approach to feedforward neural network model selection. arXiv preprint arXiv:2207.04248. * McInerney, A., & Burke, K. (2023). Interpreting feedforward neural networks as statistical models. In Preparation. ### R Package ```r devtools::install_github(c("andrew-mcinerney/selectnn", "andrew-mcinerney/interpretnn")) ```
<font size="5.5">andrew-mcinerney</font>
<font size="5.5">@amcinerney_</font>
<font size="5.5">andrew.mcinerney@ul.ie</font>